﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UserControl = System.Windows.Controls.UserControl;

namespace UpdaterForm.Tabs
{
    /// <summary>
    /// Interaction logic for SettingsTab.xaml
    /// </summary>
    public partial class SettingsTab : UserControl
    {
        public SettingsTab()
        {
            InitializeComponent();
        }

        //TODO: path selecting appeard in repo selecting - refactor move to util class
        private void SelectFolder(object sender, RoutedEventArgs e)
        {
            var dialog = new FolderBrowserDialog
            {
                Description = "Select path to repository root folder."
            };
            var result = dialog.ShowDialog();
            if (result != DialogResult.OK)
                return;
            Settings.Instance.RepositoryPath = dialog.SelectedPath;
            TbxRepoPath.Text = Settings.Instance.RepositoryPath;
        }

        private void BtnApply_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
